using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using Planisoft.Entities;


namespace Planisoft.DAO.Mapping
{
    public class RegimenPensionarioMap : EntityTypeConfiguration<RegimenPensionario>
    {
        public RegimenPensionarioMap()
        {
            // Primary Key
            this.HasKey(t => t.IdRegPensionario);

            // Properties
            this.Property(t => t.CodPdtRegPens)
                .HasMaxLength(10);

            this.Property(t => t.DesRegPens)
                .IsFixedLength()
                .HasMaxLength(18);

            // Table & Column Mappings
            this.ToTable("RegimenPensionario");
            this.Property(t => t.IdRegPensionario).HasColumnName("IdRegPensionario");
            this.Property(t => t.CodPdtRegPens).HasColumnName("CodPdtRegPens");
            this.Property(t => t.DesRegPens).HasColumnName("DesRegPens");
        }
    }
}
